//
//  FirstCollectionViewCell.m
//  AStage_shougongke
//
//  Created by 赵磊 on 16/1/22.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "FirstCollectionViewCell.h"

@implementation FirstCollectionViewCell
- (void)dealloc
{
    [_imgView release];
    [_priceLabel release];
    [_titleLabel release];
    [super dealloc];
}
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.imgView = [[UIImageView alloc] init];
        self.imgView.layer.cornerRadius = 4;
        self.imgView.clipsToBounds = YES;
        [self.contentView addSubview:_imgView];
        self.titleLabel = [[UILabel alloc] init];
        _titleLabel.numberOfLines = 2;
        _titleLabel.font = [UIFont systemFontOfSize:15];
        [self.contentView addSubview:_titleLabel];
        self.priceLabel = [[UILabel alloc] init];
        _priceLabel.textColor = [UIColor colorWithRed:234 / 255.0 green:86 / 255.0 blue:81 / 255.0 alpha:1.0];
        _priceLabel.font = [UIFont systemFontOfSize:20];
        [self.contentView addSubview:_priceLabel];
    }
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    _imgView.frame = CGRectMake(0, 0, self.contentView.frame.size.width, self.contentView.frame.size.width);
    _titleLabel.frame = CGRectMake(10, self.contentView.frame.size.width + 10, self.contentView.frame.size.width - 20, 60);
    _priceLabel.frame = CGRectMake(10, self.contentView.frame.size.width + 60, self.contentView.frame.size.width, 40);
}
@end
